export const center = { lat: 27.824219, lng: 113.117763, alt: 10000, duration: 1, heading: 1, pitch: -48 };

//mars3d配资
export const map3dConfig: any = {
  scene: {
    center: { lat: 30.054604, lng: 108.885436, alt: 17036414, heading: 0, pitch: -90 },
    contextOptions: {
      webgl: {
        preserveDrawingBuffer: true,
      },
    },
    clock: { multiplier: 2 },
    shadows: false,
    removeDblClick: true,
    sceneMode: 3,
    showSun: true,
    showMoon: true,
    showSkyBox: true,
    showSkyAtmosphere: true,
    fog: true,
    fxaa: true,
    requestRenderMode: true, // 显式渲染
    globe: {
      depthTestAgainstTerrain: false,
      baseColor: "#546a53",
      showGroundAtmosphere: true,
      enableLighting: false,
    },
    cameraController: {
      zoomFactor: 3,
      minimumZoomDistance: 1,
      maximumZoomDistance: 5e7,
      enableRotate: true,
      enableTranslate: true,
      enableTilt: true,
      enableZoom: true,
      enableCollisionDetection: true,
    },
  },
  control: {
    baseLayerPicker: false,
    homeButton: false,
    sceneModePicker: false,
    navigationHelpButton: false,
    fullscreenButton: false,
    mouseDownView: false,
    clockAnimate: true, // 时钟动画控制(左下角)
    timeline: true, // 是否显示时间线控件
    compass: {
      bottom: "120px",
      right: "15px",
      innerSvg:
        '<svg t="1701226455497" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7254" width="24" height="24"><path d="M982.028557 404.405174 573.32303 83.942886c-34.918864-27.694272-89.619352-27.694272-124.538216 0L43.175542 404.577188c-13.933143 11.008903-16.169326 31.134554-5.332437 44.895683s31.134554 16.169326 44.895683 5.332437l13.073072-10.320847 0 387.547791c0 54.872501 56.936671 95.983874 107.852847 95.983874l639.892491 0c50.22812 0 84.1149-38.531161 84.1149-95.983874L927.672098 443.452377l14.449185 11.352931c5.84848 4.644381 12.729044 6.880564 19.781623 6.880564 9.460776 0 18.921552-4.128339 25.286074-12.213002C998.369898 435.539728 995.789686 415.414077 982.028557 404.405174zM607.897867 797.113388l0 66.741475-63.989249 0-63.989249 0-63.989249 0 0-66.741475 0-112.325214c0-37.155048 30.102469-77.234336 95.983874-77.234336 66.053418 0 95.983874 40.079288 95.983874 77.234336L607.897867 797.113388 607.897867 797.113388z" fill="#1296DB" p-id="7255"></path></svg>',
    },
  },
  terrain: {
    // url: "//data.mars3d.cn/terrain",
    // url: "http://65.65.116.200:8888/3d/dxsj18/",
    // show: true
  },
  basemaps: [{
    name: "影像地图",
    type:"xyz",
    crs: "EPSG3857",
    maximumLevel: 19,
    minimumLevel: 1,
    url: "http://65.65.116.200:8888/3d/ggmap/{z}/{x}/{y}.jpeg",
    show: true
  }]
  // basemaps: [
  //   {
  //     id: 10000,
  //     name: "地图底图",
  //     type: "group",
  //     templateValues: {
  //       dataServer: "//data.mars3d.cn",
  //       gltfServerUrl: "//data.mars3d.cn/gltf",
  //     },
  //     pid: -1,
  //     opacity: 1,
  //     zIndex: 0,
  //   },
  //   {
  //     id: 10003,
  //     name: "天地图影像",
  //     icon: "https://vill.fantere.com/img/tdt_img.png",
  //     type: "tdt",
  //     layer: "img_d",
  //     show: true,
  //   }
  // ],
};

export const type = {
  accident: "事故地图数据",
  construction: "施工地图信息",
  alarm: "警情地图信息",
  vioSurveil: "违法地图信息",
  deathAccident: "亡人事故地图信息",
}

// 定义不同类型的属性映射
export const attributeMapping = {
  accident: {
    "事故编号": "sgbh",
    "行政区划编码": "xzqh",
    "登记编号": "djbh",
    "事故发生时间": "sgfssj",
    "路号": "lh",
    "路名": "lm",
    "公里数": "gls",
    "米数": "ms",
    "事故发生地点": "sgdd",
    "受伤人数": "ssrs",
    "死亡人数": "swrs",
    "简要案情": "jyaq",
    "事故初始原因": "sgccyy",
    "事故认定原因": "sgrdyy"
  },
  construction: {
    "项目名称": "projectName",
    "施工车道数量": "occupiedLineNum",
    "施工车道": "occupiedLineInfo",
    "施工原因": "occupyReason",
    "围栏长度": "fenceLength",
    "围栏宽度": "fenceWidth",
    "围栏说明": "fenceDesc",
    "施工地点": "constructionPoint",
    "施工单位": "constructionUnit",
    "计划开始时间": "planStartTime",
    "计划结束时间": "planEndTime"
  },
  alarm: {
    "警情编号": "alarmId",
    "报警时间": "callPoliceTime",
    "案发地址": "occurPlace",
    "主要情节": "content",
    "报警人电话": "callPolicePersonPhone",
    "录入用户名称": "inputUserName",
    "报警类型": "callPoliceType",
    "处警部门名称": "processDeptName",
    "报警细类": "callPoliceSubType",
    "结案部门名称": "overDeptName",
    "结案人名称": "overUserName",
    "结案描述": "overDesc"
  },
  vioSurveil: {
    "号牌号码": "hphm",
    "号牌种类": "hpzl",
    "机动车使用性质": "syxz",
    "交通方式": "jtfs",
    "机动车所有人": "jdcsyr",
    "行政区划编码": "xzqh",
    "违法地址": "wfdz",
    "违法行为": "wfxw"
  },
  accidentHotMapDetail: {
    "事故编号": "sgbh",
    "行政区划": "xzqh",
    "登记编号": "djbh",
    "事故发生时间": "sgfssj",
    "路号": "lh",
    "路名": "lm",
    "公里数": "gls",
    "米数": "ms",
    "事故地点": "sgdd",
    "受伤人数": "ssrs",
    "死亡人数": "swrs",
    "简要案情": "jyaq",
    "事故初始原因": "sgccyy",
    "事故认定原因": "sgrdyy",
    "坐标": "dzzb",
    "隔离设施": "dlwlgl",
    "中央隔离设施": "zyglss",
    "路侧防护设施": "fhss",
    "路面情况": "lmzk",
    "路表情况": "lbqk",
    "照明条件": "zmtj"
  },
  deathAccident: {
    "事故编号": "sgbh",
    "行政区划编码": "xzqh",
    "登记编号": "djbh",
    "事故发生时间": "sgfssj",
    "路号": "lh",
    "路名": "lm",
    "公里数": "gls",
    "米数": "ms",
    "事故发生地点": "sgdd",
    "受伤人数": "ssrs",
    "死亡人数": "swrs",
    "简要案情": "jyaq",
    "事故初始原因": "sgccyy",
    "事故认定原因": "sgrdyy"
  },
};


export const modelList = [
      // "http://65.65.116.200:8888/3d/BDDS_08_15/tileset.json",
      // "http://65.65.116.200:8888/3d/CL_10_19/tileset.json",
      // "http://65.65.116.200:8888/3d/GTYX_10_10/tileset.json",
      // "http://65.65.116.200:8888/3d/HD1_8_31/tileset.json",
      // "http://65.65.116.200:8888/3d/HD2_8_31/tileset.json",
      // "http://65.65.116.200:8888/3d/HD3_8_31/tileset.json",
      // "http://65.65.116.200:8888/3d/HD4_8_31/tileset.json",
      // "http://65.65.116.200:8888/3d/LK_10_10/tileset.json",
      // "http://65.65.116.200:8888/3d/LLX_10_10/tileset.json",
      // "http://65.65.116.200:8888/3d/QF_10_11/tileset.json",
      // "http://65.65.116.200:8888/3d/TYQ_09_25/tileset.json",
      // "http://65.65.116.200:8888/3d/XJX_08_15/tileset.json",
      // "http://65.65.116.200:8888/3d/YDL_0701/tileset.json",
      // "http://65.65.116.200:8888/3d/YDL_09_13/tileset.json",
      // "http://65.65.116.200:8888/3d/YLXC_10_10/tileset.json",
      // "http://65.65.116.200:8888/3d/YLX_09_13/tileset.json",
      // "http://65.65.116.200:8888/3d/YX_10_10/tileset.json",
      // "http://65.65.116.200:8888/3d/fangte/tileset.json",
      // "http://65.65.116.200:8888/3d/qby_10_23/tileset.json",
      // "http://65.65.116.200:8888/3d/road_3dTiles4_23/tileset.json",
      "http://65.65.116.200:8888/3d/hxsn/3Dtiles/tileset.json",
      "http://65.65.116.200:8888/3d/lufengdadao/3Dtiles/tileset.json",
      "http://65.65.116.200:8888/3d/fly_road_dcddlk/tileset.json"
    ]
  // const list = [
    //   "http://65.65.116.218:8889/zz3d/BDDS_08_15/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/CL_10_19/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/GTYX_10_10/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/HD1_8_31/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/HD2_8_31/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/HD3_8_31/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/HD4_8_31/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/LK_10_10/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/LLX_10_10/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/QF_10_11/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/TYQ_09_25/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/XJX_08_15/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/YDL_0701/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/YDL_09_13/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/YLXC_10_10/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/YLX_09_13/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/YX_10_10/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/fangte/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/qby_10_23/tileset.json",
    //   "http://65.65.116.218:8889/zz3d/road_3dTiles4_23/tilese.json"
    // ]
